package interfaceMutil.Test1;

/**
 * Time    : 2023/3/19 10:37
 * Author  : 王摇摆
 * FileName: PingPongMan.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class PingPongMan implements SportMan {
    private String name;

    public PingPongMan() {
    }

    public PingPongMan(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public void run() {
        System.out.println(SportMan.SPORT_MAN_NUMBER + "号运动员" + this.getName() + "跑得很快~");
    }

    @Override
    public void competition() {
        System.out.println(SportMan.SPORT_MAN_NUMBER + "号运动员" + this.getName() + "正在比赛~");

    }

    @Override
    public void abroad() {
        System.out.println(SportMan.SPORT_MAN_NUMBER + "号运动员" + this.getName() + "去国外比赛了！");

    }

    @Override
    public void law() {
        System.out.println(SportMan.SPORT_MAN_NUMBER + "号运动员" + this.getName() + "需要遵守比赛规则~");

    }
}
